using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Net.Fan.SmallPig.DataAccess;
using Net.Fan.SmallPig.BusinessRules;

public partial class ascx_OnesPermission : System.Web.UI.UserControl
{
    private string userName;

    /// <summary>
    /// the user will be show
    /// </summary>
    public string UserName
    {
        get
        {
            return this.userName;
        }
        set
        {
            this.userName = value;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        this.labUser.Text = this.userName;
        this.labGroups.Text = GroupBiz.GetGeneralGroupString(this.userName);
       
        DataTable permissions = PermissionDA.GetPermissionsByUser(this.userName);
        this.grdPermission.DataSource = permissions;
        this.grdPermission.DataBind();
    }
}
